package com.beasts.antpage.core.controller.content;

import com.beasts.antpage.core.common.dto.AjaxDTO;
import com.beasts.antpage.core.entity.content.ApArticle;
import com.beasts.antpage.core.service.content.IApArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author Locker
 * @date 17/07/2018 3:38 PM
 * @since 1.0
 */
@Controller
public class ApArticleController {

    @Autowired
    private IApArticleService apArticleService;


    @RequestMapping("/content/article/findAll")
    @ResponseBody
    public AjaxDTO findAll() {
        List<ApArticle> articleList = apArticleService.findAll();
        return new AjaxDTO(articleList, "xx");
    }

}
